package blue.tools.model;

import blue.tools.constants.BlueContants;
import org.apache.commons.lang.StringUtils;

/**
 * Created by 2018-08-01 19:39:13
 */
public class ResponseData {

    private String code;
    private String msg;
    private Object data;

    public ResponseData() {
    }

    public ResponseData(String code, String msg, Object data) {
        this.code = code;
        this.msg = msg;
        this.data = data;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }

    public void setAll(String code, String msg, String data){
        this.code=code;
        this.msg=msg;
        this.data=data;
    }

    public boolean isSucess(){
        if(StringUtils.isNotBlank(this.code) && BlueContants.SUCCESS.equalsIgnoreCase(this.code)){
            return true;
        }

        return false;
    }



}
